package cn.zzuisa.news.repository;

import java.util.List;

import cn.zzuisa.news.entity.IprNewsInfo;
import cn.zzuisa.news.entity.IprNewsItem;
import cn.zzuisa.news.entity.IprNewsType;
import cn.zzuisa.news.entity.Page;
import cn.zzuisa.news.form.IprNewsInfoForm;
import cn.zzuisa.news.form.IprNewsItemForm;
import cn.zzuisa.news.form.NewsEditForm;

public interface IprNewsRepository {
	boolean addType(String name);

	boolean addNewsInfo(IprNewsInfoForm iprNewsInfoForm);

	boolean addNewsItem(IprNewsItemForm iprNewsItemForm);

	List<IprNewsType> listtype();

	IprNewsType findIprNewsTypeById(Integer id);

	List<IprNewsInfo> listinfoByType(Integer type);

	IprNewsInfo findInfoById(Integer id);

	boolean editById(IprNewsInfoForm iprNewsInfoForm, Integer id);

	boolean delete(Integer id);

	List<String> showTypes();

	List<String> showTypesId();
	
	Page page(Integer current, Integer size, String sql);
	
	IprNewsItem findById(Integer id);

	boolean edit(NewsEditForm newsEditForm);
	
	boolean deleteNewsItem(Integer id);
	
}
